package br.com.fiap.exemplos;

import java.util.ArrayList;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean(name="pastel")
@SessionScoped

public class MeuBackBeanPastel {

    private ArrayList<Pasteis> pastel;

    public MeuBackBeanPastel(){
        Pasteis p1 = new Pasteis();

        p1.setNome("carne");
        p1.setValor(10);

        Pasteis p2 = new Pasteis();

        p2.setNome("queijo");
        p2.setValor(20);

        pastel = new ArrayList<Pasteis>();
        pastel.add(p1);
        pastel.add(p2);
    }

    public ArrayList<Pasteis> getPastel() {
        return pastel;
    }

    public void setPastel(ArrayList<Pasteis> pastel) {
        this.pastel = pastel;
    }


 

}
